#include "bsp_fric.h"
#include "main.h"
#include "chassis_task.h"

extern TIM_HandleTypeDef htim1;
void fric_off(void)
{
//    __HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_1, FRIC_OFF);
//    __HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_2, FRIC_OFF);
		chassis_move_t *chassis_move;
		chassis_move = get_motor_fric_point();
		chassis_move->motor_fric[0].speed_set = 0;
		chassis_move->motor_fric[1].speed_set = 0;
}
void fric1_on(fp32 cmd)
{
//    __HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_1, cmd);
		chassis_move_t *chassis_move;
		chassis_move = get_motor_fric_point();
		chassis_move->motor_fric[0].speed_set = cmd;
}
void fric2_on(fp32 cmd)
{
//    __HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_2, cmd);
		chassis_move_t *chassis_move;
		chassis_move = get_motor_fric_point();
		chassis_move->motor_fric[1].speed_set = cmd;
}


